import request from '@/utils/request'
/**
 * 获取活动列表  成功
 * @param {*} params
 * @returns
 */
export const getActivityListApi = (params) => {
  return request({
    url: '/clues/activity/list',
    params
  })
}
/**
 * 下拉框（渠道类型）
 * @returns
 */
export const getQDListApi = () => {
  return request({
    url: '/system/dict/data/type/clues_item'
  })
}
/**
 * 下拉框（活动折扣类型)
 * @returns
 */
export const getTypeListApi = () => {
  return request({
    url: '/system/dict/data/type/channel_type'
  })
}
/**
 * 新增活动
 * @param {*} data
 * @returns
 */
export const addActivitiesApi = (data) => {
  return request({
    url: '/clues/activity',
    method: 'POST',
    data
  })
}
/**
 * 获取活动详细
 * @param {*} id
 * @returns
 */
export const getactivitiesDataApi = (id) => {
  return request({
    url: `/clues/activity/${id}`
  })
}
/**
 * 删除活动
 * @param {*} id
 * @returns
 */
export const delactivitiesDataApi = (id) => {
  return request({
    url: `/clues/activity/delete/${id}`,
    method: 'DELETE'
  })
}
/**
 * 编辑功能
 * @param {*} data
 * @returns
 */
export const editactivitiesDataApi = (data) => {
  return request({
    url: `/clues/activity`,
    method: 'PUT',
    data
  })
}
